package com.wzj.yygh.hosp.controller.admin;

import com.wzj.yygh.common.result.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * @Description
 * @Author wzj
 */
@Api(tags = "登录接口")
@RestController
@RequestMapping("/admin/hosp")
public class UserLoginController {
    @PostMapping("user/login")
    public R login(){
        return R.ok().data("token","admin-token");
    }

    @GetMapping("user/info")
    public R info(){
        return R.ok().data("roles",new String[]{"admin"})
                .data("introduction","I am a super administrator")
                .data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif")
                .data("name","Super Admin");
    }

    @PostMapping("user/logout")
    public R logout(){
        return R.ok();
    }
}
